// Mutex.h: interface for the Mutex class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_MUTEX_H__EAAABF5F_0A52_4D9A_B7F8_338FF50AAC18__INCLUDED_)
#define AFX_MUTEX_H__EAAABF5F_0A52_4D9A_B7F8_338FF50AAC18__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

class Mutex
{
    friend class Lock;
public:
    Mutex () { InitializeCriticalSection (& _critSection); }
    ~Mutex () { DeleteCriticalSection (& _critSection); }
private:
    void Acquire ()
    {
        EnterCriticalSection (& _critSection);
    }
    void Release ()
    {
        LeaveCriticalSection (& _critSection);
    }

    CRITICAL_SECTION _critSection;
};


#endif // !defined(AFX_MUTEX_H__EAAABF5F_0A52_4D9A_B7F8_338FF50AAC18__INCLUDED_)
